package com.google.code.p.restrpc;

/**
 * @author dz
 */
public interface RpcRequest {
    
    public static final RpcRequest[] EMPTY_ARRAY = new RpcRequest[0];
    
    public static final String SECURITY_KEY = "security";
    
    public static final String ASYNC_KEY = "async";
    
    /**
     * @return
     */
    public String getUrl();
    
    /**
     * @return
     */
    public RpcProtocal getProtocal();
    
    /**
     * @return
     */
    public TransferFormat getTransferFormat();
    
    /**
     * @return
     */
    public String getAddress();
    
    /**
     * @return
     */
    public int getPort();
    
    /**
     * @return default value : 1
     */
    public int getWeight();
    
    /**
     * @return
     */
    public String getContext();
    
    /**
     * @return
     */
    public String getServiceName();
    
    /**
     * @return
     */
    public String getMethodName();
    
    /**
     * @return
     */
    public boolean isAsync();
    
    /**
     * @return
     */
    public String getRequestId();
    
    /**
     * @return
     */
    public RequestData getData();
    
    /**
     * @param body
     */
    public void setBody(Object body);
    
}
